#ifndef BANK_SAVINGSACCOUNT_HH
#define BANK_SAVINGSACCOUNT_HH

#include "Account.hh"

class SavingsAccount : public Account {
public:
    SavingsAccount(std::string id, std::string owner, double initialBalance = 0.0);

    void displayDetails() const override;
    bool canDeposit() const override;
    bool canWithdraw() const override;
    // Savings account can only transfer to the same customer's checking account.
    // This check might need access to the Customer object or BankSystem.
    bool canTransferTo(const Account& destinationAccount) const override;
    
    // 添加getAccountTypeName方法的声明
    std::string getAccountTypeName() const override;

    // Override transfer if specific logic needed, otherwise base might suffice if canTransferTo handles the rule.
    // bool transfer(Account& destinationAccount, double amount, const std::string& note) override;
    bool deposit(double amount, const std::string& note) override; // Should likely return false or throw
    bool withdraw(double amount, const std::string& note) override; // Should likely return false or throw

};

#endif // BANK_SAVINGSACCOUNT_HH 